package ifm4j.collections.treeCollections;

import ifm4j.collections.treeCollections.factories.TreeFactory;
import ifm4j.utils.Identifier;

import org.w3c.dom.Element;

public class TreeLeaf extends TreeObject implements INonRoot {
	private INonLeaf parent;

    public TreeLeaf(Identifier id) {
        super(id);
        
    }

    /**
     * <p>
     * Get parent
     * </p>
     * <p>
     * The method cannot override.
     * </p>
     */
    @Override
    public final INonLeaf getParent() {
        return this.parent;
    }

    /**
     * <p>
     * Set parent
     * </p>
     * <p>
     * The method cannot override.
     * </p>
     */
    @Override
    public final void setParent(INonLeaf parent) {
        this.parent = parent;
    }

    @Override
    public Element toXElem() throws TreeCollectionException {
        return super.toXElem();
    }

    /**
     * Parse XML element to tree leaf. do nothing.
     * 
     * @param xelem
     * @param factory
     * @param leaf
     */
    public static void xmlParser(Element xelem, TreeFactory factory, TreeLeaf leaf) {
        // do nothing
    }

}
